Optimal. Leaf size=63 \[ \frac{2 x \sqrt{b x^{n-2}-\frac{a}{x^2}}}{n}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b x^{n-2}-\frac{a}{x^2}}}\right )}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0804348, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {1979, 2007, 2029, 203} \[ \frac{2 x \sqrt{b x^{n-2}-\frac{a}{x^2}}}{n}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b x^{n-2}-\frac{a}{x^2}}}\right )}{n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1979
Rule 2007
Rule 2029
Rule 203
Rubi steps
\begin{align*} \int \sqrt{\frac{-a+b x^n}{x^2}} \, dx &=\int \sqrt{-\frac{a}{x^2}+b x^{-2+n}} \, dx\\ &=\frac{2 x \sqrt{-\frac{a}{x^2}+b x^{-2+n}}}{n}-a \int \frac{1}{x^2 \sqrt{-\frac{a}{x^2}+b x^{-2+n}}} \, dx\\ &=\frac{2 x \sqrt{-\frac{a}{x^2}+b x^{-2+n}}}{n}+\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,\frac{1}{x \sqrt{-\frac{a}{x^2}+b x^{-2+n}}}\right )}{n}\\ &=\frac{2 x \sqrt{-\frac{a}{x^2}+b x^{-2+n}}}{n}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{-\frac{a}{x^2}+b x^{-2+n}}}\right )}{n}\\ \end{align*}
Mathematica [A] time = 0.0293767, size = 78, normalized size = 1.24 \[ \frac{x \sqrt{\frac{b x^n-a}{x^2}} \left (2 \sqrt{b x^n-a}-2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{b x^n-a}}{\sqrt{a}}\right )\right )}{n \sqrt{b x^n-a}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.721, size = 105, normalized size = 1.7 \begin{align*} -2\,{\frac{ \left ( a-b{{\rm e}^{n\ln \left ( x \right ) }} \right ) x}{n \left ( b{{\rm e}^{n\ln \left ( x \right ) }}-a \right ) }\sqrt{{\frac{b{{\rm e}^{n\ln \left ( x \right ) }}-a}{{x}^{2}}}}}-2\,{\frac{x\sqrt{a}}{n\sqrt{b{{\rm e}^{n\ln \left ( x \right ) }}-a}}\arctan \left ({\frac{\sqrt{b{{\rm e}^{n\ln \left ( x \right ) }}-a}}{\sqrt{a}}} \right ) \sqrt{{\frac{b{{\rm e}^{n\ln \left ( x \right ) }}-a}{{x}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{b x^{n} - a}{x^{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.928918, size = 252, normalized size = 4. \begin{align*} \left [\frac{2 \, x \sqrt{\frac{b x^{n} - a}{x^{2}}} + \sqrt{-a} \log \left (\frac{b x^{n} - 2 \, \sqrt{-a} x \sqrt{\frac{b x^{n} - a}{x^{2}}} - 2 \, a}{x^{n}}\right )}{n}, \frac{2 \,{\left (x \sqrt{\frac{b x^{n} - a}{x^{2}}} - \sqrt{a} \arctan \left (\frac{x \sqrt{\frac{b x^{n} - a}{x^{2}}}}{\sqrt{a}}\right )\right )}}{n}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\frac{b x^{n} - a}{x^{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]